@mixin lineForh4($before, $after) {
    content: "";
    width: 20vw;
    border-top: 1px solid #ddd2b7;
    margin: auto;
    margin-right: $before;
    margin-left: $after;
}

@mixin pageLayout() {
    position: fixed;
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

@mixin titleContainer {
    display: flex;
    flex-direction: column;
}

@mixin layerDesgin (){
    content: "";
    position: absolute;
    background-color: black;
    height: 100%;
    width: 100%;
    opacity: 0.4;
}

@mixin background ($url){
    background-image: url($url);
    background-size: cover;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: -1;
}

@media screen and (min-width:992px) {
    body {
        display: flex;
        justify-content: center;
        padding-top: 100px;
    }
    .navbar.fixed-top {
        margin: 120px 100px 0 100px;
    }
}

.navbar.fixed-top {
    flex-wrap: nowrap;
    background-color: transparent;
    .container-fluid{
        @media screen and (max-width:992px) {
            flex-direction: column;
        }
        align-content: flex-start;
        height: inherit;
        font-size: 2rem;
        font-weight: lighter;
        &__toggler-block{
            display: flex;
            justify-content: space-between;
            align-items:center;
            @media screen and (max-width:992px) {
                width: 100%;
                .navbar-toggler{
                    display: flex;
                    flex-direction: column;
                    border-style: none;
                    &:focus{
                        outline: none;
                        box-shadow: none;
                    }
                    @each $number in a1, a2, a3 {
                        .#{$number}-icon {
                            background-color: white;
                            width: 40px;
                            height: 4px;
                            margin: 2px;
                        }
                    }
                }
            }
            img{
                width: 30%;
            }
        }
        .show{
            display: flex;
            width: inherit;
            padding-bottom: 40px;
            .navbar-nav{
                align-items: center;
                justify-content: space-around;
                width: inherit;
                .nav-item{
                    display: flex;
                    width: inherit;
                    justify-content: center;
                    color: white;
                    .nav-link{
                        padding: 18px;
                        color: inherit;
                    }
                }
            }
        }
    }
}

#homePage{
    @include pageLayout();//img poisition
    color: white;
   .homPage-container{
        @include titleContainer();
        &__title{
            display: flex;
            color: #ddd2b7;//overwrite
            justify-content: center;
            font-weight: lighter;
            font-size: 20px;
            font-style: italic;
            &::before{
                @include lineForh4(3px, 0);
            }
            &::after{
                @include lineForh4(0, 3px);
            }
        }
        &__name{
            display: flex;
            justify-content: center;
            font-size: 48px;
        }
    }
    @media screen and (min-width:992px) {
        height: 80vh;
        width: 90vw;
    }
    .background{
        @include background('./img/background.png');
        &::before{
            @include layerDesgin();
        }
    }
}

#aboutUs{
    @extend #homePage;
    .homPage-container__intro{
        width: 80vw;
        padding: 10px 180px;
        font-style: italic;
        font-size: 14px;
        text-align: center;
        @media screen and (max-width:992px) {
            width: auto;
            padding: 20px;
        }
    }
    // @overwrite
    .background{
        @include background('./img/about-us.png');
    }
}

#orderNow{
    @extend #homePage;
    // background-color: #202020;
    .carousel {
        @media screen and (max-width:992px) {
            margin: 0 15px;
        }
    }
    // @overwrite
    .background{
        @include background('./img/BACKGOURND.jpg');
    }
}

#cakes{
    @extend #homePage;
    @media screen and (max-width: 992px) {
        height: auto;
    }
    position: relative;
    .background::before{
        height: 0;
    }
    .list-group{
        padding: 80px 20px 0 20px;
        .list-group-item{
            display: flex;
            background-color: transparent;
            border-bottom: 1px solid;
            border-color: #DDD2B7;
            img{
                width: 50%;
                padding: 0;
                background-color: transparent;
                border: 0;
            }
            &__intro{
                display: flex;
                flex-direction: column;
                justify-content: center;
                color: white;
                text-align: center;
                h4 {
                    font-size: 15px;
                    font-weight: bold;
                }
                p{
                    font-size: 14px;
                    font-weight: lighter;
                }
            }
        }
    }
    // @overwrite
    .background{
        @include background('./img/BACKGOURND.jpg');
    }
}

#address{
    @extend #homePage;
    flex-direction: column;
    .homPage-container{
        flex: 1;
        padding-top: 200px;
    }
    .address-container{
        background-color: #6f4e37c5;
        width: 100%;
        padding-top: 80px;
        flex: 3;
        &__title{
            display: flex;
            justify-content: center;
            font-size: 16px;
            font-style: italic;
            text-align: center;
        }
    }
    // @overwrite
    .background{
        @include background('./img/address.png');
    }
}

#contactUs{
    @extend #homePage;
    flex-direction: column;
    .social-media{
        position: relative;
        width: 75%;
        margin-top: 4px;
        a{
            color: #ddd2b7;
            font-size: 38px;
            margin-right: 20px;
        }
    }
    .contactUs-detail{
        h4{
            font-size: 16px;
            font-weight: lighter;
        }
        p{
            font-size: 24px;
        }
    }
    .contactUs-worktime{
        width: 90%;
        margin-top: 20px;
        .row{
            align-items: center;
            justify-content: center;
            padding: 10px 0;
            font-style: italic;
            color: #ddd2b7;
            font-weight: lighter;
        }
    }
    // @overwrite
    .background{
        @include background('./img/contact.jpg');
    }
}

//this sequence cannot be changed because only homepage can display in first rendering
#aboutUs, #orderNow, #cakes, #address, #contactUs {
    display: none;
}
